Skip to main content

CreateUserContentExportDownloadUrl

A POST request that creates a download URL for a given export file part. The endpoint is https://api.aware.work/external/search/v1/user-content-exports/{exportId}/download-url.

The download URLs created by this request are only temporarily available, and have a time-to-live (TTL) of approximately 5 minutes. See the response of this API for an exact timestamp.

Access

To access this operation, your API token must have one of the following permissions:

For more information, see the API token documentation.

Request Format

Parameters

This request requires a path parameter, which should be set to the exportId of the user content export you wish to generate a download for. If you do not have an ID, you can query QueryUserContentExports, filtering on the necessary information.

From there, you must have a filePartId to send in the body of the request. Note that only successfully completed user content exports will have one or more file part IDs.

The following is the full body object:

{
"filePartId": "long-string-of-characters"
}

Query

Below is a sample of the request.

curl -X POST --location "https://api.aware.work/external/search/v1/user-content-exports/0debd486-8a09-dbc8-aaa3-c3393c0476fc/download-url" \
-H "x-aware-api-key: ${API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"filePartId": "idf-sf-77777777-762f-467b-bb9c-47d2852ec4c6\\9f7b9116-7beb-41f6-b73f-7360c635005a"
}'

Response Format

If your request was successfully executed, the endpoint will return an HTTP 200 status and a response similar to the one below:

{
"downloadUrl": "https://download.aware.work/api/v1/download/some-unique-path",
"downloadUrlExpirationTime": "2024-03-18T23:55:26.8808196+00:00"
}

The URL provided via downloadUrl can then be used to download the requested export's file part. Note that the x-aware-api-key must be set with the call to download, or authorization will fail.

The downloadUrlExpirationTime specifies the time at which the download link will no longer be valid.